import type { BaseType } from "@/type/BaseType";
import { reactive } from "vue";

export default function useDialog() {
  const dialog = reactive<BaseType>({
    visible: false,
    title: "新增角色",
    width: 630,
    height: 280,
  });
  const addBtn = () => {
    dialog.visible = true;
  };
  const onClose = () => {
    dialog.visible = false;
  };
  const onConfirm = () => {
    dialog.visible = false;
  };
  const onShow = () => {
    dialog.visible = true;
  };
  return {
    dialog,
    addBtn,
    onClose,
    onConfirm,
    onShow,
  };
}
